package com.itgaoshu.hospitalproject.service.impl;

import com.itgaoshu.hospitalproject.bean.*;
import com.itgaoshu.hospitalproject.mapper.ReportMapper;
import com.itgaoshu.hospitalproject.service.OutpatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class OutpatientServiceImpl implements OutpatientService {
    @Autowired
    private ReportMapper reportMapper;

    public List<ReportVo> selectAllReport() {

        return reportMapper.selectAllReportVo();
    }

    @Override
    public int addReport(CReport reportVo) {
        return reportMapper.addReport(reportVo);
    }

    @Override
    public int deleteReport(int id) {
        return reportMapper.deleteReport(id);
    }

    @Override
    public int updateReport(String zhuan, Integer id) {
        return reportMapper.updateReport(zhuan,id);
    }

    @Override
    public List<CDepartments> selectAllCDe() {
        return reportMapper.selectAllCDe();
    }

    @Override
    public List<CRegisteredtype> selectAllReg() {
        return reportMapper.selectAllReg();
    }

    @Override
    public List<Doctor> selectAllDoc() {
        return reportMapper.selectAllDoc();
    }

    @Override
    public int seltymo(int registeredId) {
        return reportMapper.seltymo(registeredId);
    }

    @Override
    public int selectCcarid(String carid) {
        return reportMapper.selectCcarid(carid);
    }

    @Override
    public int selectPhone(String phone) {
        return reportMapper.selectPhone(phone);
    }

    @Override
    public Double selectsumrep(int reportId) {
        return reportMapper.selectsumrep(reportId);
    }

    @Override
    public int selectxiangmu(int reid) {
        return reportMapper.selectxiangmu(reid);
    }

    @Override
    public int selectyi(int reid) {
        return reportMapper.selectyi(reid);
    }

    @Override
    public int selectgong(int reid) {
        return reportMapper.selectgong(reid);
    }
}
